/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50717
 Source Host           : localhost
 Source Database       : date

 Target Server Type    : MySQL
 Target Server Version : 50717
 File Encoding         : utf-8

 Date: 04/06/2017 21:48:27 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `academy`
-- ----------------------------
DROP TABLE IF EXISTS `academy`;
CREATE TABLE `academy` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `academy`
-- ----------------------------
BEGIN;
INSERT INTO `academy` VALUES ('1', '计算机'), ('2', '传媒'), ('3', '通信');
COMMIT;

-- ----------------------------
--  Table structure for `advertise`
-- ----------------------------
DROP TABLE IF EXISTS `advertise`;
CREATE TABLE `advertise` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `src` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `advertise`
-- ----------------------------
BEGIN;
INSERT INTO `advertise` VALUES ('1', 'https://www.baidu.com', 'http://106.184.7.12:8002/Public/test.jpg', '1'), ('2', 'http://www.pornhub.com', 'http://106.184.7.12:8002/Public/test1.jpg', '1'), ('3', 'http://www.taobao.com', 'http://106.184.7.12:8002/Public/test3.jpg', '1');
COMMIT;

-- ----------------------------
--  Table structure for `advice`
-- ----------------------------
DROP TABLE IF EXISTS `advice`;
CREATE TABLE `advice` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) DEFAULT NULL,
  `content` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `collection`
-- ----------------------------
DROP TABLE IF EXISTS `collection`;
CREATE TABLE `collection` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `collection`
-- ----------------------------
BEGIN;
INSERT INTO `collection` VALUES ('1', '1', '1'), ('2', '2', '1'), ('3', '3', '1'), ('4', '4', '1');
COMMIT;

-- ----------------------------
--  Table structure for `date`
-- ----------------------------
DROP TABLE IF EXISTS `date`;
CREATE TABLE `date` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `title` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date_type` int(2) DEFAULT NULL,
  `cost_model` int(11) DEFAULT NULL,
  `content` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
  `place` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date_time` int(11) DEFAULT NULL,
  `created_at` int(11) DEFAULT NULL,
  `apply_num` int(11) DEFAULT NULL,
  `sure_num` int(11) DEFAULT NULL,
  `limit_num` int(11) DEFAULT NULL,
  `gender_limit` int(11) DEFAULT NULL,
  `score` float DEFAULT NULL,
  `scored_num` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `date`
-- ----------------------------
BEGIN;
INSERT INTO `date` VALUES ('1', '1', '来约炮!', '3', '1', 'test', '重邮宾馆', '1529456317', '1429446317', '0', '0', '1', '0', '3', '3', '1'), ('2', '1', '来约炮!', '2', '1', 'test', '重邮宾馆', '1529456316', '1429446316', '0', '0', '1', '1', '0', '0', '2'), ('3', '1', '来约炮!', '1', '1', 'test', '重邮宾馆', '1429456315', '1429446315', '0', '0', '1', '1', '0', '0', '2'), ('4', '1', '来约炮!', '1', '1', 'test', '重邮宾馆', '1429456314', '1429446314', '0', '0', '1', '0', '0', '0', '2'), ('5', '1', '来约炮!', '2', '1', 'test', '重邮宾馆', '1429456313', '1429446313', '0', '0', '1', '2', '0', '0', '2'), ('26', '1', 'test', '1', '1', 'test1', 'menkou', '1431429313', '1431434132', '0', '0', '0', '0', '0', '0', '2'), ('25', '1', 'test', '1', '1', 'test1', 'menkou', '1431429313', '1431434102', '0', '0', '0', '0', '0', '0', '2');
COMMIT;

-- ----------------------------
--  Table structure for `date_limit`
-- ----------------------------
DROP TABLE IF EXISTS `date_limit`;
CREATE TABLE `date_limit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_id` int(11) DEFAULT NULL,
  `selectmodel` int(11) DEFAULT NULL,
  `condition` int(11) DEFAULT NULL,
  `limit` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `date_limit`
-- ----------------------------
BEGIN;
INSERT INTO `date_limit` VALUES ('1', '1', '1', '1', '2'), ('2', '1', '1', '1', '3'), ('24', '1', '2', '2', '3'), ('23', '1', '2', '2', '3'), ('22', '1', '2', '2', '4');
COMMIT;

-- ----------------------------
--  Table structure for `date_type`
-- ----------------------------
DROP TABLE IF EXISTS `date_type`;
CREATE TABLE `date_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `date_type`
-- ----------------------------
BEGIN;
INSERT INTO `date_type` VALUES ('1', '吃饭'), ('2', '打牌'), ('3', '约炮');
COMMIT;

-- ----------------------------
--  Table structure for `grade`
-- ----------------------------
DROP TABLE IF EXISTS `grade`;
CREATE TABLE `grade` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12013 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `grade`
-- ----------------------------
BEGIN;
INSERT INTO `grade` VALUES ('1', '2012级'), ('2', '2013级'), ('3', '2014级'), ('4', '2015级'), ('100', '其他');
COMMIT;

-- ----------------------------
--  Table structure for `letter`
-- ----------------------------
DROP TABLE IF EXISTS `letter`;
CREATE TABLE `letter` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_id` int(11) DEFAULT NULL,
  `from` int(11) DEFAULT NULL,
  `to` int(11) DEFAULT NULL,
  `content` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `letter`
-- ----------------------------
BEGIN;
INSERT INTO `letter` VALUES ('1', '1', '1', '1', 'test', '1429446317', '1', '1'), ('2', '2', '1', '1', 'test2', '1429446317', '1', '1');
COMMIT;

-- ----------------------------
--  Table structure for `status_advertise`
-- ----------------------------
DROP TABLE IF EXISTS `status_advertise`;
CREATE TABLE `status_advertise` (
  `status_id` int(3) unsigned NOT NULL,
  `status_name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `status_advertise`
-- ----------------------------
BEGIN;
INSERT INTO `status_advertise` VALUES ('1', '启用'), ('2', '不启用');
COMMIT;

-- ----------------------------
--  Table structure for `status_cost_model`
-- ----------------------------
DROP TABLE IF EXISTS `status_cost_model`;
CREATE TABLE `status_cost_model` (
  `id` int(11) NOT NULL,
  `name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `status_cost_model`
-- ----------------------------
BEGIN;
INSERT INTO `status_cost_model` VALUES ('1', 'AA'), ('2', '我请客'), ('3', '求请客');
COMMIT;

-- ----------------------------
--  Table structure for `status_date`
-- ----------------------------
DROP TABLE IF EXISTS `status_date`;
CREATE TABLE `status_date` (
  `id` int(11) NOT NULL,
  `name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `status_date`
-- ----------------------------
BEGIN;
INSERT INTO `status_date` VALUES ('0', '已结束'), ('1', '成功'), ('2', '受理中');
COMMIT;

-- ----------------------------
--  Table structure for `status_letter`
-- ----------------------------
DROP TABLE IF EXISTS `status_letter`;
CREATE TABLE `status_letter` (
  `id` int(11) unsigned NOT NULL,
  `name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `status_letter`
-- ----------------------------
BEGIN;
INSERT INTO `status_letter` VALUES ('0', '未读'), ('1', '已读');
COMMIT;

-- ----------------------------
--  Table structure for `status_letter_type`
-- ----------------------------
DROP TABLE IF EXISTS `status_letter_type`;
CREATE TABLE `status_letter_type` (
  `id` int(5) NOT NULL,
  `name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `status_letter_type`
-- ----------------------------
BEGIN;
INSERT INTO `status_letter_type` VALUES ('0', '拒绝'), ('1', '接受'), ('2', '未处理');
COMMIT;

-- ----------------------------
--  Table structure for `status_score`
-- ----------------------------
DROP TABLE IF EXISTS `status_score`;
CREATE TABLE `status_score` (
  `id` int(5) NOT NULL,
  `name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `status_score`
-- ----------------------------
BEGIN;
INSERT INTO `status_score` VALUES ('0', '未打分'), ('1', '已打分');
COMMIT;

-- ----------------------------
--  Table structure for `user_date`
-- ----------------------------
DROP TABLE IF EXISTS `user_date`;
CREATE TABLE `user_date` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `score_status` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `user_date`
-- ----------------------------
BEGIN;
INSERT INTO `user_date` VALUES ('8', '1', '1', '1431244033', '2', '0'), ('2', '2', '1', '1429446317', '2', '0'), ('3', '3', '1', '1429446317', '2', '0'), ('6', '4', '1', '1431241589', '2', '0'), ('10', '2', '2', '1431257920', '2', '0');
COMMIT;

-- ----------------------------
--  Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stu_num` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `head` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `signature` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nickname` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gender` int(1) DEFAULT NULL,
  `grade` int(1) DEFAULT NULL,
  `academy` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `qq` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
  `weixin` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `telephone` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
  `token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `users`
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES ('1', '2013211000', 'http://106.184.7.12:8002/Public/head.jpg', 'i\'m db', '刘晨凌东安', '2', '2', '3', '1234567890', 'we', '12345678900', 'nasdfnldssdaf', '1433003912', '1433003934', 'sdafasd'), ('2', '2013211001', 'http://106.184.7.12:8002/Public/head.jpg', 'i\'m db1', 'aliling', '1', '3', '1', '0987654321', 'ew', '00123456789', 'cdsagrebvfra', '1433003912', '1433003934', null), ('6', '2013211854', 'http://106.184.7.12:8002/Public/default.jpg', '', '2013211854', null, null, '', '', '', '', 'b55042b420af1e68b7f04819c749b47a', '1490930006', '1490930063', 'fsdaf'), ('15', 'Lich', null, null, null, null, null, null, null, null, null, '7b67faa7776830d020a61334d56f6ce1', null, '1491486415', '7c4a8d09ca3762af61e59520943dc26494f8941b');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
